package zuoye_3_10;

import java.util.ArrayList;
import java.util.Scanner;

//4.把任意字符串加密显示   
//*  YUANzhi1987
//*  加密后为
//*  zvbo9441987
//*  加密规则:
//	 *   1.如果是大写字母变成小写字母,往后移动一位
//	 *   2.小写字母通过收集输入发对应键盘来进行加密
//	 *   1-1
//	 *   abc-2
//	 *   def-3
//	 *   ghi-4
//	 *   jkl-5
//	 *   mno-6
//	 *   pqrs-7
//	 *   tuv-8
//	 *   wxyz-9
//	 *   0-0
//	 *   3.数字不变
public class Zuoye_4 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		System.out.println("加密后的字符串为:");
		System.out.println(jiami(str));
	}

	private static String jiami(String str) {
		// TODO Auto-generated method stub
		String encrypted = "";
        for (char c : str.toCharArray()) {
            if (Character.isUpperCase(c)) {
                encrypted += Character.toLowerCase((char) ((c - 'A' + 1) % 26 + 'a'));
            } else if (Character.isLowerCase(c)) {
                if (c >= 'a' && c <= 'c') encrypted += '2';
                else if (c >= 'd' && c <= 'f') encrypted += '3';
                else if (c >= 'g' && c <= 'i') encrypted += '4';
                else if (c >= 'j' && c <= 'l') encrypted += '5';
                else if (c >= 'm' && c <= 'o') encrypted += '6';
                else if (c >= 'p' && c <= 's') encrypted += '7';
                else if (c >= 't' && c <= 'v') encrypted += '8';
                else if (c >= 'w' && c <= 'z') encrypted += '9';
            } else if (Character.isDigit(c)) {
                encrypted += c;
            }
        }
        return encrypted;
	}
}
